<?php
/**
 * Services_Omniture_Request_Common 
 * 
 * PHP Version 5.1.0+
 * 
 * @category  Services
 * @package   Services_Omniture
 * @author    Bill Shupp <hostmaster@shupp.org> 
 * @copyright 2008 Bill Shupp
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
 * @link      http://servicessitecatalyst.googlecode.com
 */

/**
 * @uses Services_Omniture
 */
require_once 'Services/Omniture/Common.php';

/**
 * Outlines the interface for the Request objects.
 * 
 * @category  Services
 * @package   Services_Omniture
 * @author    Bill Shupp <hostmaster@shupp.org> 
 * @copyright 2008 Bill Shupp
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
 * @link      http://servicessitecatalyst.googlecode.com
 */
abstract class Services_Omniture_Request_Common
{
    /**
     * URI
     * 
     * @var mixed
     */
    protected $uri;

    /**
     * Instance of Services_Omniture_Common.  Used
     * for getting options.
     * 
     * @var mixed
     */
    protected $so;

    /**
     * Stores the uri and the instance of Services_Omniture
     * 
     * @param string                   $uri URI.
     * @param Services_Omniture_Common $so  Services_Omniture_Common instance
     * 
     * @return void
     */
    public function __construct($uri, Services_Omniture_Common $so)
    {
        $this->uri = $uri;
        $this->so  = $so;
    }

    /**
     * Sets the POST body.
     * 
     * @param SimpleXMLElement $body Body contents (xml)
     * 
     * @return void
     */
    abstract public function setBody(SimpleXMLElement $body);

    /**
     * Actually sends the request.
     * 
     * @return void
     */
    abstract public function sendRequest();

    /**
     * Gets the response code.
     * 
     * @return int
     */
    abstract public function getResponseCode();

    /**
     * Gets the body of the response.
     * 
     * @return string
     */
    abstract public function getResponseBody();
}
?>
